package models

import "gorm.io/gorm"

type UserCar struct {
	gorm.Model
	UserId         int64   `gorm:"type:int(10);comment:'用户id'"`
	CourseId       int64   `gorm:"type:int(10);comment:'课程id'"`
	CourseTitle    string  `gorm:"type:varchar(50);comment:'课程标题'"`
	CourseDescribe string  `gorm:"type:varchar(100);comment:'课程描述'"`
	CourseNum      int64   `gorm:"type:int(10);comment:'课程数量'"`
	CoursePrice    float64 `gorm:"type:decimal(10,2);comment:'课程价格'"`
	CarPrice       float64 `gorm:"type:decimal(10,2);comment:'总价格'"`
}

func (uc *UserCar) TableName() string {
	return "user_car"
}
